package demo;
public class Test {
    public static void main(String [] args) {
        //1.常量直接构造
        String str ="hello,world！";
        //2.字符数组构造
        char[]arr={'a','b','c'};
        String str2=new String(arr);
        //3.直接创建对象构造
        String str3=new String("abc");
        System.out.println(str);
        System.out.println(str2);
        System.out.println(str3);


    }
}
